<?php (!defined('IN_SYSTEM') || !defined('ADMIN_PRE')) && exit('Access Denied!');?>
{admintemplate header}
<div class="box">
 	<div class="heading">
		<h1>编辑用户</h1>
	<div class="buttons">
		{if ican('userindex')}
      <a href="{url('admin.php?m=user')}">用户列表</a>
      {/if}
      {if ican('useradd')}
      <a href="{url('admin.php?m=user&f=add')}">添加用户</a>
      {/if}
      {if ican('usergroupindex')}
      <a href="{url('admin.php?m=usergroup')}">用户分组</a>
      {/if}
      {if ican('usergroupadd')}
      <a href="{url('admin.php?m=usergroup&f=add')}">添加用户组</a>
      {/if}
	</div>
	</div>
	<div class="main">

	<form name="user_add" method="post" action="{url admin.php?m=user&f=save_add}">
	<table cellspacing="0" class="sub">
		<tr>
			<td colspan="2"><div id="tip"></div></td>
		</tr>
		<tr>
			<td width="80" align="right">用户名：</td>
			<td><input type="text" name="username" class="input" size="40" onblur="check_username()" /><span id="msg_username"></span>
			</td>
		</tr>
		<tr>
			<td align="right">用户组：</td>
			<td>
			
			<select name="groupid">
			{php $groups = $_G['userobj']->user_group();}
			{loop $groups $group}
			<option value="{$group['gid']}" {if $group['gid']==5}selected{/if}>{$group['groupname']}</option>;
			{/loop}
			</select></td>
		</tr>
		<tr>
			<td align="right">密码：</td>
			<td><input type="password" name="password" class="input" size="40" /></td>
		</tr>
		<tr>
			<td align="right">确认密码：</td>
			<td><input type="password" name="password2" class="input" size="40" /></td>
		</tr>
		<tr>
			<td align="right">QQ：</td>
			<td><input type="text" name="qq" class="input" size="40" /></td>
		</tr>
		<tr>
			<td align="right">E-Mail：</td>
			<td><input type="text" name="email" class="input" size="40" /></td>
		</tr>
		<tr>
			<td align="right">主页：</td>
			<td><input type="text" name="signature" class="input" size="40" /> <span>别忘了加上http://</span></td>
		</tr>
		<tr class="bg2"><td></td><td><input type="button" class="button" id="save_user" value="保存用户" onclick="user_save()" /> <input type="button" class="button" onclick="window.location.href='admin.php?m=user'" value="取消返回" /></td></tr>
	</table>
	</form>

	</div>
</div>
{admintemplate footer}